#define _CRT_SECURE_NO_WARNINGS 1

#include"single_list.h"

void test1()
{
	SLTNode* plist = NULL;

	
	SLTPushFront(&plist,1);
	SLTPushFront(&plist, 2);
	SLTPushFront(&plist, 3);
	SLTPushFront(&plist, 4);
	SLTPrint(plist);

}
void test2()
{

	SLTNode* plist = NULL;
	SLTPushBack(&plist, 1);
	SLTPushBack(&plist, 2);
	SLTPushBack(&plist, 3);
	SLTPushBack(&plist, 4);
	SLTPrint(plist);
	SLTPopFront(&plist);
	SLTPopFront(&plist);
	SLTPrint(plist);

	SLTPopFront(&plist);
	SLTPopFront(&plist);
	SLTPopFront(&plist);
	SLTPopFront(&plist);
	SLTPrint(plist);
}
void test3()
{

	SLTNode* plist = NULL;
	SLTPushBack(&plist, 1);
	SLTPushBack(&plist, 2);
	SLTPushBack(&plist, 3);
	SLTPushBack(&plist, 4);
	//SLTPrint(plist);
	//SLTPopFront(&plist);
	//SLTPopFront(&plist);
	//SLTPrint(plist);

	SLTPopBack(&plist);
	SLTPrint(plist);

	SLTPopBack(&plist);
	SLTPrint(plist);

	SLTPopBack(&plist);
	SLTPopBack(&plist);
	SLTPrint(plist);
}
void test4()
{

	SLTNode* plist = NULL;
	SLTPushBack(&plist, 1);
	SLTPushBack(&plist, 2);
	SLTPushBack(&plist, 3);
	SLTPushBack(&plist, 4);
	SLTPrint(plist);
	SLTNode* pos = SLTFind(plist, 1);
	/*if (pos)
	{
		SLTInsert(&plist, pos,3);
	}
	SLTPrint(plist);
	pos = SLTFind(plist, 3);*/
	if (pos)
	{
		SLTErase(&plist, pos);
	}
	//SLTPrint(plist);
	//SLTModif(plist, 3, 7);
	SLTPrint(plist);

	
	//SLTPrint(plist);
	
}
int main()
{

	//test1();
	//test2();
	test3();
	test4();
	return 0;
}


